import 'package:flutter/material.dart';
import 'package:sainbainu/common/values/colors.dart';

import 'widgets.dart';

class EazyLogin extends StatelessWidget {
  final VoidCallback onLogin;
  final VoidCallback onCodeLogin;

  const EazyLogin({
    Key? key,
    required this.onLogin,
    required this.onCodeLogin,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const LoginTitle('一键登录'),
        const Padding(
          padding: EdgeInsets.symmetric(vertical: 50),
          child: Text(
            '立即登录，开启全新世界',
            style: TextStyle(
              fontSize: 18,
              color: AppColors.active,
            ),
          ),
        ),
        LoginBtn(
          text: '本机号码一键登录',
          onPressed: onLogin,
        ),
        const SizedBox(height: 20),
        LoginTextBtn(
          text: '使用其他手机号码登录',
          onPressed: onCodeLogin,
        ),
      ],
    );
  }
}
